package yablonskyi.alex.pages;

import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;

import org.testng.*;
import org.testng.annotations.*;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class AddMinusToComment extends TestBase {
  @Test
  public void addMinusToComment() throws Exception {
		for (int i=0; i<userName.length;i++){
			openMainPage();
		    enterCredentialsForLogin(userName[i], "poppin123");
		    submitLoginOfUser();
		    System.out.println("Login As: " + userName[i]);
		    goToNews("88418");
		    System.out.println("News is found");
		    Thread.sleep(2000);
		    findCommentForMinusAndClick("1854785");
		    System.out.println("Task done by " + userName[i]);
		    Thread.sleep(2000);
		    logoutFromSite();
		    System.out.println("User logout: " + userName[i]);
		    Thread.sleep(2000);
		}
  }
}
